package com.byq.mm.abstractx.protocol;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Interaction implements Serializable{
	static public final String DIRECTION_FROM_CLIENT = "client";
	static public final String DIRECTION_FROM_SERVER = "server";
	
	public String from;
	public String to;
	public String direction;
	public String cluster;
	public String command;
	public Map<String, String> attributes = new HashMap<String, String>();
	public boolean isReport(){
		return direction.equals(Interaction.DIRECTION_FROM_SERVER);
	}
	public boolean isCommand(){
		return direction.equals(Interaction.DIRECTION_FROM_CLIENT);
	}
}
